package java_DesignPattern.SixPrinciple.LawOfDemeter;

/**
 * 迪米特法则:最少知道法则,一个对象,对其他的对象应该尽少的了解
 */
public class Test {

    public static void main(String[] args) {

        SuperStar superStar = new SuperStar("科比");
        Company company = new Company("内阁传媒");
        Fans fans = new Fans("粉丝");
        Agent agent = new Agent();

        agent.setStar(superStar);
        agent.setCompany(company);
        agent.setFans(fans);

        agent.meeting();
        agent.business();
    }
}
